// Tester Module for npAES Module




module np_aes_tester();

reg clk, rst, start;
reg [0:127] key_in;
reg [0:127] data;

wire [0:127] aes_data; // output from npAES
wire done;


np_aes npAES ( 	.clk(clk),
				.rst(rst),
				.key(key_in),
				.start(start),
				.data_in(data),
				.done(done),
				.data_out(aes_data));
				

// generate the clk
initial
	begin
		#1 clk = 0;
		forever begin
			#1 clk = !clk;
			end
	end
	
// generate log files	
initial
	begin
		$dumpfile ("np_aes_tester.dump");
		$dumpvars (0, np_aes_tester);
	end

// generate test values

initial
	begin
		key_in = 128'h0;
		data = 128'h0;
		start = 0;
		rst = 1; // reset the system
		
		#3 rst = 0;
		#2 
			key_in = 128'h2b7e151628aed2a6abf7158809cf4f3c;
		#1
			data = {32'h3243f6a8, 32'h885a308d, 32'h313198a2, 32'he0370734};
			start = 1;
		#2
	  		start = 0;
		#100
		
		$finish;
	end
			
		

endmodule

